package lipengfei.botaiframework.security.jwt.handler.impl;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import cn.hutool.json.JSONUtil;
import lipengfei.botaiframework.security.jwt.handler.TokenInvalidHandler;
import lipengfei.botaiframework.utils.http.ResponseUtil;

import java.util.HashMap;
import java.util.Map;


public class InvalidTokenHandler implements lipengfei.botaiframework.security.jwt.handler.TokenInvalidHandler {

    public void handle(HttpServletRequest request, HttpServletResponse response) {
        Map<String, Object> resMap = new HashMap<String, Object>();
        resMap.put("code",5020);
        resMap.put("msg","jwt不合法");
        ResponseUtil.out(response, JSONUtil.toJsonStr(resMap));
    }
}
